
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum TrackDirection {
    Vertical,
    Horizontal,
}

#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
pub struct Track {
    pub row: i64,
    pub col: i64,
    pub dir: TrackDirection,
    pub index: usize,
}

impl Track {
    pub fn new(row: i64, col: i64, dir: TrackDirection, index: usize) -> Self {
        Self {
            row,
            col,
            dir,
            index,
        }
    }

    pub fn vertical(row: i64, col: i64, index: usize) -> Self {
        Self::new(row, col, TrackDirection::Vertical, index)
    }

    pub fn horizontal(row: i64, col: i64, index: usize) -> Self {
        Self::new(row, col, TrackDirection::Horizontal, index)
    }
}
